<template>
  <div class="empty-state-container">
    <!-- 顶部标签栏 -->
    <div class="tabs">
      <div 
        v-for="(tab, index) in tabs" 
        :key="index" 
        :class="{ active: activeTab === index }"
        @click="activeTab = index"
      >
        {{ tab.label }} <span class="count">{{ tab.count }}</span>
      </div>
    </div>

    <!-- 提示内容区域 -->
    <div class="content">
      <img 
        src="https://gw.alicdn.com/tfs/TB1bY69a79E3KVjSZFGXXc19XXa-222-158.png" 
        alt="empty illustration" 
        class="illustration"
      >
      <p class="tip-text">暂时没有被 Boss 发现，建议尝试多与 Boss 沟通</p>
      <button class="recommend-btn" @click="handleViewRecommend">查看推荐职位</button>
    </div>

    <!-- 顶部提示条（可选，根据需求决定是否常驻或定时消失） -->
    <!-- <div class="top-tip" v-if="showTopTip">
      <i class="icon-error">!</i>
      <span class="tip-text">资料不完善，即将跳转资料完善页面</span>
      <button class="close-btn" @click="showTopTip = false">×</button>
    </div> -->
  </div>
</template>

<script setup>
import { ref } from 'vue';

// 标签数据
const tabs = ref([
  { label: '沟通', count: 0 },
  { label: '已投递', count: 0 },
  { label: '面试', count: 0 },
  { label: '感兴趣', count: 0 }
]);
// 当前激活的标签
const activeTab = ref(0);

// 顶部提示条显示状态
const showTopTip = ref(true);

// 查看推荐职位点击事件
const handleViewRecommend = () => {
  // 这里可写跳转逻辑，比如用 vue-router 跳转到推荐职位页面
  console.log('前往推荐职位页面');
};
</script>

<style scoped>
.empty-state-container {
  width: 100%;
  max-width: 800px;
  margin: 40px auto;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* 标签栏样式 */
.tabs {
  display: flex;
  border-bottom: 1px solid #e8e8e8;
}
.tabs > div {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}
.tabs > div.active {
  color: #00b2b1;
  border-bottom: 2px solid #00b2b1;
}
.count {
  margin-left: 4px;
  color: #999;
  font-size: 12px;
}

/* 内容区域样式 */
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
}
.illustration {
  width: 120px;
  margin-bottom: 20px;
}
.tip-text {
  color: #999;
  margin-bottom: 30px;
  line-height: 1.6;
}
.recommend-btn {
  background-color: #00b2b1;
  color: #fff;
  padding: 10px 30px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s;
}
.recommend-btn:hover {
  background-color: #009e9d;
}

/* 顶部提示条样式 */
.top-tip {
  display: flex;
  align-items: center;
  background-color: #fff8f0;
  border-bottom: 1px solid #ffe8cc;
  padding: 8px 16px;
  color: #f56c6c;
}
.icon-error {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  background-color: #f56c6c;
  color: #fff;
  border-radius: 50%;
  margin-right: 8px;
  font-style: normal;
  font-size: 12px;
}
.close-btn {
  margin-left: auto;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 16px;
}
.close-btn:hover {
  color: #666;
}
</style>